If a snapshot cannot be created , or tablock is specified , dbcc checktable acquires a shared table lock to obtain the required consistency 如果无法创建快照,或指定了tablock ,则dbcc checktable将获取一个共享表锁来获得所需的一致性。
This means long - term blocking table locks are not held and queries or updates to the underlying table can continue during the alter index reorganize transaction 这意味着不保留长期阻塞的表锁,且对基础表的查询或更新可以在alter index reorganize事务处理期间继续。
Microsoft sql server 2005 mobile edition sql server mobile automatically escalates row locks and page locks into table locks when a transaction exceeds its escalation threshold 当事务超出其升级阈值时, microsoft sql server 2005 mobile edition ( sql server mobile )会自动将行锁和页锁升级为表锁。
If a transaction acquires a large number of row or page locks , the database engine may grant a table lock and then free all the lower - level locks to minimize locking overhead 如果一个事务获取了大量的行锁或页锁,则数据库引擎可能授予它一个表锁,然后释放所有较低级别的锁,以将锁定开销降到最小。
If the lock escalation attempt succeeds and the full table lock is acquired , then all heap or b - tree , page page , key - range , or row - level locks held by the transaction on the heap or index are released 如果锁升级尝试成功并获取全表锁,将释放事务在堆或索引上所持有的所有堆或b树锁、页锁( page锁) 、键范围锁( key锁)或行级锁( rid锁) 。
Shared locks acquired for read committed or repeatable read are generally row locks , although the row locks can be escalated to page or table locks if a significant number of the rows in a page or table are referenced by the read 针对read committed或repeatable read获取的共享锁通常为行锁,尽管当读取引用了页或表中大量的行时,行锁可以升级为页锁或表锁。